package cn.pli.bike.ui;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.framemodule.BaseApp.BaseApp;

import java.util.List;

import cn.bingoogolapple.androidcommon.adapter.BGARecyclerViewAdapter;
import cn.bingoogolapple.androidcommon.adapter.BGARecyclerViewHolder;
import cn.bingoogolapple.androidcommon.adapter.BGAViewHolderHelper;
import cn.pli.bike.App;
import cn.pli.bike.R;
import cn.pli.bike.bean.ProblemBean;

/**
 * Created by shangdongzhou on 2017/11/19.
 */

public class CommonProblemAdapter extends BGARecyclerViewAdapter<ProblemBean> {


    public CommonProblemAdapter(RecyclerView recyclerView) {
        super(recyclerView, R.layout.item_call_center_common_problem_detail);
    }


    @Override
    protected void fillData(BGAViewHolderHelper helper, int position, ProblemBean model) {
        helper.getTextView(R.id.tv_problem_name).setText(model.getProblemType());
        RecyclerView recyclerView = helper.getView(R.id.recycler_call_center_info);
        CommonProblemInfoAdapter commonProblemInfoAdapter = new CommonProblemInfoAdapter(recyclerView);
        recyclerView.setLayoutManager(new LinearLayoutManager(App.getApp()));
        recyclerView.setAdapter(commonProblemInfoAdapter);
        commonProblemInfoAdapter.setData(model.getAllPproblem());
    }


}
